<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 访问您的账户</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CFC9',
                        neutral: '#F5F7FA',
                        dark: '#1D2129',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .form-input-focus {
                @apply focus:border-primary focus:ring-2 focus:ring-primary/20 focus:outline-none;
            }
            .transition-custom {
                transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            }
        }
    </style>
</head>
<body class="font-inter bg-neutral min-h-screen flex flex-col">
    <!-- 导航栏 -->
    <header class="bg-white shadow-sm">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between items-center h-16">
                <!-- 网站Logo -->
                <div class="flex items-center">
                    <a href="index.html" class="flex items-center space-x-2">
                        <span class="text-primary text-2xl"><i class="fa fa-connectdevelop"></i></span>
                        <span class="font-bold text-xl text-dark">石神的网页</span>
                    </a>
                </div>
                
                <!-- 空区域，保持布局一致 -->
                <div></div>
                
                <!-- 返回首页按钮 -->
                <div class="flex items-center">
                    <a href="index.html" class="inline-flex items-center px-4 py-2 text-dark hover:text-primary transition-custom font-medium">
                        <i class="fa fa-home mr-2"></i>
                        首页
                    </a>
                </div>
            </div>
        </div>
    </header>

    <!-- 主内容区 -->
    <main class="flex-grow flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
        <div class="w-full max-w-md">
            <div class="bg-white rounded-2xl shadow-md overflow-hidden">
                <div class="p-6 sm:p-8">
                    <div class="text-center mb-8">
                        <h2 class="text-2xl font-bold text-dark mb-2">欢迎回来</h2>
                        <p class="text-gray-600">请登录您的账户以继续</p>
                    </div>
                    
                    <form class="space-y-6" id="loginForm">
                        <!-- 邮箱/用户名 -->
                        <div>
                            <label for="email" class="block text-sm font-medium text-gray-700 mb-1">邮箱或用户名</label>
                            <div class="relative">
                                <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                    <i class="fa fa-user text-gray-400"></i>
                                </div>
                                <input type="text" id="email" name="email" 
                                    class="block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-lg form-input-focus transition-custom"
                                    placeholder="请输入邮箱或用户名" required>
                            </div>
                        </div>
                        
                        <!-- 密码 -->
                        <div>
                            <div class="flex items-center justify-between mb-1">
                                <label for="password" class="block text-sm font-medium text-gray-700">密码</label>
                                <a href="#" class="text-sm text-primary hover:text-primary/80 transition-custom">忘记密码？</a>
                            </div>
                            <div class="relative">
                                <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                    <i class="fa fa-lock text-gray-400"></i>
                                </div>
                                <input type="password" id="password" name="password" 
                                    class="block w-full pl-10 pr-10 py-3 border border-gray-300 rounded-lg form-input-focus transition-custom"
                                    placeholder="请输入密码" required>
                                <button type="button" class="absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600 transition-custom" id="togglePassword">
                                    <i class="fa fa-eye-slash"></i>
                                </button>
                            </div>
                        </div>
                        
                        <!-- 记住我 -->
                        <div class="flex items-center">
                            <div class="flex items-center h-5">
                                <input id="remember" name="remember" type="checkbox" 
                                    class="w-4 h-4 text-primary border-gray-300 rounded focus:ring-primary transition-custom">
                            </div>
                            <label for="remember" class="ml-2 block text-sm text-gray-700">
                                记住我的登录状态
                            </label>
                        </div>
                        
                        <!-- 登录按钮 -->
                        <div>
                            <button type="submit" 
                                class="w-full flex justify-center items-center px-4 py-3 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-custom">
                                登录
                                <i class="fa fa-sign-in ml-2"></i>
                            </button>
                        </div>
                    </form>
                    
                    <!-- 注册链接 -->
                    <div class="mt-6 text-center">
                        <p class="text-gray-600">
                            还没有账号？ 
                            <a href="register.html" class="font-medium text-primary hover:text-primary/80 transition-custom">
                                立即注册
                            </a>
                        </p>
                    </div>
                    
                    <!-- 分隔线 -->
                    <div class="relative my-8">
                        <div class="absolute inset-0 flex items-center">
                            <div class="w-full border-t border-gray-200"></div>
                        </div>
                        <div class="relative flex justify-center text-sm">
                            <span class="px-2 bg-white text-gray-500">或使用以下方式登录</span>
                        </div>
                    </div>
                    
                    <!-- 社交媒体登录 -->
                    <div class="grid grid-cols-3 gap-4">
                        <button type="button" class="flex justify-center items-center px-4 py-2 border border-gray-300 rounded-lg shadow-sm bg-white text-gray-700 hover:bg-gray-50 transition-custom">
                            <i class="fa fa-weixin text-green-500 text-xl"></i>
                        </button>
                        <button type="button" class="flex justify-center items-center px-4 py-2 border border-gray-300 rounded-lg shadow-sm bg-white text-gray-700 hover:bg-gray-50 transition-custom">
                            <i class="fa fa-qq text-blue-500 text-xl"></i>
                        </button>
                        <button type="button" class="flex justify-center items-center px-4 py-2 border border-gray-300 rounded-lg shadow-sm bg-white text-gray-700 hover:bg-gray-50 transition-custom">
                            <i class="fa fa-github text-gray-800 text-xl"></i>
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 页脚信息 -->
            <div class="mt-6 text-center text-sm text-gray-500">
                <p>
                    登录即表示您同意我们的
                    <a href="#" class="text-primary hover:text-primary/80 transition-custom">服务条款</a>
                    和
                    <a href="#" class="text-primary hover:text-primary/80 transition-custom">隐私政策</a>
                </p>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="bg-white border-t border-gray-200 py-6">
        <div class="container mx-auto px-4 sm:px-6 lg:px-8">
            <div class="text-center text-sm text-gray-500">
                <p>&copy; 2023 Connect. 保留所有权利。</p>
            </div>
        </div>
    </footer>

    <script>
        // 密码显示/隐藏切换
        const togglePassword = document.getElementById('togglePassword');
        const passwordInput = document.getElementById('password');
        
        togglePassword.addEventListener('click', function() {
            // 切换密码可见性
            const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
            passwordInput.setAttribute('type', type);
            
            // 切换图标
            this.querySelector('i').classList.toggle('fa-eye');
            this.querySelector('i').classList.toggle('fa-eye-slash');
        });
        
        // 表单提交处理
        document.getElementById('loginForm').addEventListener('submit', function(e) {
            e.preventDefault();
            
            // 在实际应用中，这里会有AJAX请求到服务器验证登录信息
            const email = document.getElementById('email').value;
            const password = document.getElementById('password').value;
            
            // 简单验证
            if (!email || !password) {
                alert('请输入邮箱/用户名和密码');
                return;
            }
            
            // 模拟登录成功
            alert('登录成功！即将跳转到首页');
            window.location.href = 'login-success.html';
        });
    </script>
</body>
</html>
